<?php
// +----------------------------------------------------------------------
// | sfadmin - Suifeng Administration
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://suifeng.tech All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: suifeng <1787585212@qq.com>
// +----------------------------------------------------------------------

namespace app\wechat;

class Module
{
    public function module_info()
    {
        return array(
            'name'          =>  'wechat',
            'title'         =>  '微信',
            'icon'          =>  'fa fa-wechat ',
            'description'   =>  '微信模块',
            'developer'     =>  '随风',
            'website'       =>  'http://suifeng.tech',
            'version'       =>  '0.36',
        );
    }

    public function module_config()
    {
        return array(
            'appid'=>  '',
            'appsecret'=>  '',
            'encodingaeskey'=>  '',
            'token'=>  '',
        );
    }

    public function admin_menu($tree)
    {
        $module_menu = $tree->add('wechat', array(
            'title'     =>  '微信',
            'icon'      =>  'fa fa-wechat ',
        ));

        $wechat_mgr = $module_menu->add('wechat_mgr', array(
            'title'     =>  '微信功能',
            'icon'      =>  'fa fa-folder-open-o',
        ));

        $wechat_mgr->add('config', array(
            'title'     =>  '微信设置',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.config/index',
        ));

        $wechat_mgr->add('mp', array(
            'title'     =>  '公众号设置',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.mp/index',
        ));

        $mp_mgr = $module_menu->add('mp_mgr', array(
            'title'     =>  '公众号管理',
            'icon'      =>  'fa fa-folder-open-o',
        ));

        $mp_mgr->add('user', array(
            'title'     =>  '用户管理',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.user/index',
        ));

        $mp_mgr->add('menu', array(
            'title'     =>  '自定义菜单',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.menu/index',
        ));

        $mp_mgr->add('tag', array(
            'title'     =>  '用户标签',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.tag/index',
        ));







        $msg_mgr = $module_menu->add('msg_mgr', array(
            'title'     =>  '消息功能',
            'icon'      =>  'fa fa-folder-open-o',
        ));

        $msg_mgr->add('config', array(
            'title'     =>  '日志管理',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'wechat/admin.log/index',
        ));
    }
}